package com.autoboot.enums;


import com.fasterxml.jackson.annotation.JsonCreator;

public enum JoinTableEnum {


    LEFT_JOIN("LEFT JOIN"),
    RIGHT_JOIN("RIGHT JOIN"),
    INNER_JOIN("INNER JOIN"),
    FULL_JOIN("FULL JOIN");

    private String code;

    JoinTableEnum(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    @JsonCreator
    public static JoinTableEnum fromValue(String value) {
        for (JoinTableEnum type : JoinTableEnum.values()) {
            if (type.code.equalsIgnoreCase(value)) {
                return type;
            }
        }
        throw new IllegalArgumentException("Unknown enum type " + value);
    }
}
